package cn.kgc.airquality.airquality.controller;

import cn.kgc.airquality.airquality.pojo.District;
import cn.kgc.airquality.airquality.pojo.ResultEntity;
import cn.kgc.airquality.airquality.service.impl.DistrictService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-20 10:20
 */
@RestController
public class DistrictController {
    @Resource
    DistrictService districtService;

    @RequestMapping("/getDistrictList")
    public ResultEntity<List<District>>getDistrictList(){
        List<District>districtList=districtService.selectAll();
        return ResultEntity.successWithoutData(districtList);
    }
}
